<template>
  <div class="tuijian">
    <img
      v-for="item in recommend"
      :key="item.advid"
      :src="item.img_url"
      :width="format_size(item.img_size, 'w')"
      :height="format_size(item.img_size, 'h')"
    />
  </div>
</template>

<script>
export default {
  props: {
    recommend: {
      type: Array,
      default: () => [],
    },
  },
  data() {
    return {};
  },
  methods: {
    format_size(val, type) {
      let arr = val.split("X");
      // console.log(arr);
      if (type == "w") {
        return arr[0];
      } else {
        return arr[1];
      }
    },
  },
};
</script>

<style lang="scss">
</style>